///@file ClosedPolyline.h
///@brief Declaration of the class representing a closed polyline
///@author Arnaud Duval
///@version 0.0
///@date 2010/03/31


#ifndef CLOSEDPOLYLINE_H
#define CLOSEDPOLYLINE_H

#include "Point.h"
#include <string>

///@class ClosedPolyline
///@brief Class defining a closed polyline
class ClosedPolyline
{
	private:
		///@brief Number of points
		unsigned int nbpts;
		///@brief Array of points
		Point* points;
	public:
		///@brief Default constructor
		ClosedPolyline();
		///@brief Constructor from a file
		ClosedPolyline(std::string);
		///@brief Copy constructor
		ClosedPolyline(const ClosedPolyline&);
		///@brief Desctructor
		~ClosedPolyline();
		///@brief Add a point to polyline
		void AddPoint(Point);
		///@brief Test if a point is located inside polyline
		bool IsInPolyline(Point);
		///@brief Return number of points
		unsigned int Nbpts();
		///@brief Overload of [] operator : direct access to a given point
		Point& operator[](unsigned int i) const;
};


#endif